package com.supreme.studyserver.service;

import com.supreme.studyserver.interfacepkg.Singer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class SingerService {

    @Autowired
    @Qualifier("metalSinger")
    private Singer metalSinger;

    public void metalSinger() {
        final String songLyrics = metalSinger.sing("song lyrics");
        System.out.println(songLyrics);
    }

    @Autowired
    @Qualifier("operaSinger")
    private Singer operaSinger;

    public void operaSinger() {
        final String songLyrics = operaSinger.sing("song lyrics");
        System.out.println(songLyrics);
    }
}
